num = int(input("请输入要转换的数据：\n"))
change = input("请选择转换进制：二、八、十、十六\n")
if change == '2':
 print(f"进制转换后的数据为:{bin(num)}")
elif change =='8' :
    print( "进制转换后的数据为: %s" % (oct(num)))
elif change == '10':
 print("进制转换后的数据为: %d" % (int(num)))
elif change =='16':
 print("进制转换后的数据为: {}".format(hex(num)))

import time
incomplete_sign = 50 # .的数量
print('='*23+'开始下载'+'='*25)
for i in range(incomplete_sign + 1):
    completed = "*" * i # 并表示已完成
    incomplete = "." * (incomplete_sign - i) # 表示未完成
    percentage = (i / incomplete_sign) * 100 # 百分比
    print("\r{:.0f}%[{}{}]". format( percentage, completed, incomplete), end="")
    time.sleep(0.5)
print("\n" + '='*23+'下载完成'+'='*25)
